package com.sphd.restaurantsystem.adapters;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sphd.restaurantsystem.R;
import com.sphd.restaurantsystem.info.GoodSellInorOutInfo;
import com.wzh.frame.utils.TimeUtils;

import java.util.List;

/**
 * Created by Hu on 2016/12/26.
 */

public class GoodSellAdapter extends BaseQuickAdapter<GoodSellInorOutInfo> {
    public GoodSellAdapter(int layoutResId, List<GoodSellInorOutInfo> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, GoodSellInorOutInfo goodSellInorOutInfo) {
 /*因公共布局 固此设置名字显示时间 */
        baseViewHolder.setText(R.id.i_record_name, TimeUtils.getTime(goodSellInorOutInfo.getOrder_fintime(),TimeUtils.DEFAULT_DATE_FORMAT))
                .setText(R.id.i_record_no, String.valueOf(goodSellInorOutInfo.getDetail_dnumber()));
    }
}
